function wgs = goalSeekRot(gamma)
  k = 0.6;
  wMax = pi / 4;
  wMin = 0.13;
  gammaMin = pi / 35;
  wgs = k * gamma;
  % Low gamma threshold.
  wgs = wgs .* (abs(wgs) >= k * gammaMin);
  % Outer Clamp.
  wgs = wgs .* (abs(wgs) < wMax) ...
        + -wMax .* (wgs <= -wMax) ...
        + wMax .* (wgs >= wMax);
  % Inner Clamp.
  wgs = wgs .* (abs(wgs) >= wMin) + ...
        -wMin .* (-wMin < wgs & wgs <= -k * gammaMin) + ...
         wMin .* (k * gammaMin < wgs & wgs <= wMin);
end
